Optimal. Leaf size=387 \[ \frac {2 a (A b-a B) \sin (c+d x) \cos ^2(c+d x)}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (-6 a^2 B+5 a A b+b^2 B\right ) \sin (c+d x) \cos (c+d x) \sqrt {a+b \cos (c+d x)}}{5 b^2 d \left (a^2-b^2\right )}+\frac {2 \left (-24 a^3 B+20 a^2 A b+9 a b^2 B-5 A b^3\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{15 b^3 d \left (a^2-b^2\right )}+\frac {2 \left (-48 a^3 B+40 a^2 A b-12 a b^2 B+5 A b^3\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 d \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (-48 a^4 B+40 a^3 A b+24 a^2 b^2 B-25 a A b^3+9 b^4 B\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 d \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.73, antiderivative size = 387, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.242, Rules used = {2989, 3049, 3023, 2752, 2663, 2661, 2655, 2653} \[ \frac {2 a (A b-a B) \sin (c+d x) \cos ^2(c+d x)}{b d \left (a^2-b^2\right ) \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (-6 a^2 B+5 a A b+b^2 B\right ) \sin (c+d x) \cos (c+d x) \sqrt {a+b \cos (c+d x)}}{5 b^2 d \left (a^2-b^2\right )}+\frac {2 \left (20 a^2 A b-24 a^3 B+9 a b^2 B-5 A b^3\right ) \sin (c+d x) \sqrt {a+b \cos (c+d x)}}{15 b^3 d \left (a^2-b^2\right )}+\frac {2 \left (40 a^2 A b-48 a^3 B-12 a b^2 B+5 A b^3\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 d \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (40 a^3 A b+24 a^2 b^2 B-48 a^4 B-25 a A b^3+9 b^4 B\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 d \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2653
Rule 2655
Rule 2661
Rule 2663
Rule 2752
Rule 2989
Rule 3023
Rule 3049
Rubi steps
\begin {align*} \int \frac {\cos ^3(c+d x) (A+B \cos (c+d x))}{(a+b \cos (c+d x))^{3/2}} \, dx &=\frac {2 a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}-\frac {2 \int \frac {\cos (c+d x) \left (-2 a (A b-a B)+\frac {1}{2} b (A b-a B) \cos (c+d x)+\frac {1}{2} \left (5 a A b-6 a^2 B+b^2 B\right ) \cos ^2(c+d x)\right )}{\sqrt {a+b \cos (c+d x)}} \, dx}{b \left (a^2-b^2\right )}\\ &=\frac {2 a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}-\frac {2 \left (5 a A b-6 a^2 B+b^2 B\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}-\frac {4 \int \frac {\frac {1}{2} a \left (5 a A b-6 a^2 B+b^2 B\right )-\frac {1}{4} b \left (5 a A b-2 a^2 B-3 b^2 B\right ) \cos (c+d x)-\frac {1}{4} \left (20 a^2 A b-5 A b^3-24 a^3 B+9 a b^2 B\right ) \cos ^2(c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{5 b^2 \left (a^2-b^2\right )}\\ &=\frac {2 a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 A b-5 A b^3-24 a^3 B+9 a b^2 B\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}-\frac {2 \left (5 a A b-6 a^2 B+b^2 B\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}-\frac {8 \int \frac {\frac {1}{8} b \left (10 a^2 A b+5 A b^3-12 a^3 B-3 a b^2 B\right )+\frac {1}{8} \left (40 a^3 A b-25 a A b^3-48 a^4 B+24 a^2 b^2 B+9 b^4 B\right ) \cos (c+d x)}{\sqrt {a+b \cos (c+d x)}} \, dx}{15 b^3 \left (a^2-b^2\right )}\\ &=\frac {2 a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 A b-5 A b^3-24 a^3 B+9 a b^2 B\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}-\frac {2 \left (5 a A b-6 a^2 B+b^2 B\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}+\frac {\left (40 a^2 A b+5 A b^3-48 a^3 B-12 a b^2 B\right ) \int \frac {1}{\sqrt {a+b \cos (c+d x)}} \, dx}{15 b^4}-\frac {\left (40 a^3 A b-25 a A b^3-48 a^4 B+24 a^2 b^2 B+9 b^4 B\right ) \int \sqrt {a+b \cos (c+d x)} \, dx}{15 b^4 \left (a^2-b^2\right )}\\ &=\frac {2 a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 A b-5 A b^3-24 a^3 B+9 a b^2 B\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}-\frac {2 \left (5 a A b-6 a^2 B+b^2 B\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}-\frac {\left (\left (40 a^3 A b-25 a A b^3-48 a^4 B+24 a^2 b^2 B+9 b^4 B\right ) \sqrt {a+b \cos (c+d x)}\right ) \int \sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}} \, dx}{15 b^4 \left (a^2-b^2\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {\left (\left (40 a^2 A b+5 A b^3-48 a^3 B-12 a b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}}\right ) \int \frac {1}{\sqrt {\frac {a}{a+b}+\frac {b \cos (c+d x)}{a+b}}} \, dx}{15 b^4 \sqrt {a+b \cos (c+d x)}}\\ &=-\frac {2 \left (40 a^3 A b-25 a A b^3-48 a^4 B+24 a^2 b^2 B+9 b^4 B\right ) \sqrt {a+b \cos (c+d x)} E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 \left (a^2-b^2\right ) d \sqrt {\frac {a+b \cos (c+d x)}{a+b}}}+\frac {2 \left (40 a^2 A b+5 A b^3-48 a^3 B-12 a b^2 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{15 b^4 d \sqrt {a+b \cos (c+d x)}}+\frac {2 a (A b-a B) \cos ^2(c+d x) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {a+b \cos (c+d x)}}+\frac {2 \left (20 a^2 A b-5 A b^3-24 a^3 B+9 a b^2 B\right ) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{15 b^3 \left (a^2-b^2\right ) d}-\frac {2 \left (5 a A b-6 a^2 B+b^2 B\right ) \cos (c+d x) \sqrt {a+b \cos (c+d x)} \sin (c+d x)}{5 b^2 \left (a^2-b^2\right ) d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.86, size = 304, normalized size = 0.79 \[ \frac {\frac {30 a^3 b (a B-A b) \sin (c+d x)}{b^2-a^2}+\frac {2 b^2 \left (12 a^3 B-10 a^2 A b+3 a b^2 B-5 A b^3\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )}{(a-b) (a+b)}+\frac {2 \left (48 a^4 B-40 a^3 A b-24 a^2 b^2 B+25 a A b^3-9 b^4 B\right ) \sqrt {\frac {a+b \cos (c+d x)}{a+b}} \left ((a+b) E\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )-a F\left (\frac {1}{2} (c+d x)|\frac {2 b}{a+b}\right )\right )}{(a-b) (a+b)}+2 b (5 A b-9 a B) \sin (c+d x) (a+b \cos (c+d x))+3 b^2 B \sin (2 (c+d x)) (a+b \cos (c+d x))}{15 b^4 d \sqrt {a+b \cos (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 1.20, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (B \cos \left (d x + c\right )^{4} + A \cos \left (d x + c\right )^{3}\right )} \sqrt {b \cos \left (d x + c\right ) + a}}{b^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + a^{2}}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \cos \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )^{3}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {3}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 5.10, size = 1308, normalized size = 3.38 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \cos \left (d x + c\right ) + A\right )} \cos \left (d x + c\right )^{3}}{{\left (b \cos \left (d x + c\right ) + a\right )}^{\frac {3}{2}}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\cos \left (c+d\,x\right )}^3\,\left (A+B\,\cos \left (c+d\,x\right )\right )}{{\left (a+b\,\cos \left (c+d\,x\right )\right )}^{3/2}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________